using System;
using System.Collections.Generic;
using System.Text;
using NBusiness.CodeDom;
using System.Reflection;
using NBusiness.Utilities;
using NBusiness.CodeDom.Compiler;
using NBusiness.CodeDom.Services;

namespace NBusiness.CodeDom
{
    [Serializable]
    public abstract class EntityTemplate : EntityCompileUnit, IHasParent
    {
        #region Members

        public string Name { get; set; }

        public TypeData Type { get; set; }

        public IHasParent Parent { get; set; }

        #endregion

        #region object overrides
        public override string ToString()
        {
            return Name;
        }

        public override bool Equals(object obj)
        {
            bool equal = false;
            if (obj is EntityTemplate)
            {
                EntityTemplate t = obj as EntityTemplate;
                equal = (t.Name == this.Name);
            }
            return equal;
        }
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
        #endregion
    }
}
